﻿using CoreProject.DTO;
using CoreProject.IRepository;
using CoreProject.IService;
using CoreProject.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;

namespace CoreProject.Service
{
    public class PderService:BaseService<Pder>,IPderService
    {
        private readonly IPderRepository _repository;

        public PderService(IPderRepository repository):base(repository) 
        {
            _repository = repository;
        }

      

        public async Task<List<Pder>> cha()
        {
            return await _repository.cha(u => true);
        }

        public  async Task<(List<Pder> list, int count)> chaf(int page, int size, string name,DateTime sj,DateTime sj1)
        {
            return  await _repository.chaf(page, size, name,sj,sj1);
        }

        public async Task<bool> gai(Pder d)
        {
            return await _repository.gai(d);
        }
        public async Task<bool> shan(string dd)
        {
            return await _repository.shan(dd);
        }
        public async Task<bool> gai1(Pder d)
        {
            return await _repository.gai1(d);
        }
        public async Task<List<MonthStatistics1Dto>> GetMonthStatistics(string nian)
        {
            return await _repository.GetMonthStatistics(nian);
        }


    }
}
